﻿<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Ping（检测与服务器的连通延迟）</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<P>函数原型：<br>Function Ping(IP As WString Ptr, ot As UInteger = 1000) As Integer<br>int Ping(wchar* IP, unsigned int ot = 1000);</P>
<P>VB、VBS、按键精灵声明：<br>Declare Function Lib "xTask.dll" Ping(ByVal IP As String, ByVal ot As Long) As Long</P>
<P>参数：<br>IP：IP地址，字符串，可以是域名<br>ot：超时时间，毫秒</P>
<P>成功返回连通到服务器需要的时间（毫秒），失败返回-1</P>
<P>说明：<br>这个函数和系统的Ping命令一样是基于ICMP协议的，服务器禁止Ping的情况下可以使用PingPort。</P>
</body>
</html>